package com.woowc.cn.config.base;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Collection;

/**
 * @version V0.0.1
 * @ClassName: {@link BaseServiceImpl}
 * @Description: Service基本的封装, 只需要集成当前类就有了基本能力了
 * @author: Lanzhou
 * @date: 2021/6/10 23:14
 * @Copyright:2019 All rights reserved.
 * 注意：本内容仅限于本人开发与维护，禁止外泄以及用于其他的商业目
 */
@SuppressWarnings("all")
public abstract class IBaseServiceImpl<M extends IBaseMapper<T>, T> extends ServiceImpl<M, T> implements IBaseService<T> {

    @Autowired
    protected M mapper;

    @Override
    public int batchAdd(Collection<T> collection) {
        return mapper.batchInsert(collection);
    }
}
